package com.zz.parkingsystem.entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 地磁表
 * @TableName t_geomagnetism
 */
@Data
public class Geomagnetism implements Serializable {
    /**
     * 地磁id
     */
    private Integer geoId;

    /**
     * 车位id
     */
    private Integer pkId;
    private String pkNo;

    /**
     * 地磁型号
     */
    private String geoModel;

    /**
     * -1:未激活 0:alive 1:dead
     */
    private Integer geoStatus;

    /**
     * 预留varchar字段
     */
    private String reservedVar;

    /**
     * 预留int字段
     */
    private Integer reservedInt;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Geomagnetism other = (Geomagnetism) that;
        return (this.getGeoId() == null ? other.getGeoId() == null : this.getGeoId().equals(other.getGeoId()))
            && (this.getPkId() == null ? other.getPkId() == null : this.getPkId().equals(other.getPkId()))
            && (this.getGeoModel() == null ? other.getGeoModel() == null : this.getGeoModel().equals(other.getGeoModel()))
            && (this.getGeoStatus() == null ? other.getGeoStatus() == null : this.getGeoStatus().equals(other.getGeoStatus()))
            && (this.getReservedVar() == null ? other.getReservedVar() == null : this.getReservedVar().equals(other.getReservedVar()))
            && (this.getReservedInt() == null ? other.getReservedInt() == null : this.getReservedInt().equals(other.getReservedInt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGeoId() == null) ? 0 : getGeoId().hashCode());
        result = prime * result + ((getPkId() == null) ? 0 : getPkId().hashCode());
        result = prime * result + ((getGeoModel() == null) ? 0 : getGeoModel().hashCode());
        result = prime * result + ((getGeoStatus() == null) ? 0 : getGeoStatus().hashCode());
        result = prime * result + ((getReservedVar() == null) ? 0 : getReservedVar().hashCode());
        result = prime * result + ((getReservedInt() == null) ? 0 : getReservedInt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", geoId=").append(geoId);
        sb.append(", pkId=").append(pkId);
        sb.append(", geoModel=").append(geoModel);
        sb.append(", geoStatus=").append(geoStatus);
        sb.append(", reservedVar=").append(reservedVar);
        sb.append(", reservedInt=").append(reservedInt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}